package cn.rtangyy.seckilling.vo;

public enum RespBeanEnum {
    // 通用
    SUCCESS(200, "SUCCESS"),
    ERROR(500, "服务端异常"),

    // 登录模块 5002xx
    LOGIN_ERROR(500210, "用户名或密码错误"),
    MOBILE_ERROR(500211, "手机号码格式不正确"),
    BIND_ERROR(500212, "参数绑定异常"),
    MOBILE_NOT_EXIST(50013, "手机号码不存在"),
    PASSWORD_UPDATE_FAIL(50014, "密码更新失败"),

    SESSION_ERROR(500215, "用户不存在"),

    // 秒杀模块 5005xx
    EMPTY_STOCK(500500, "库存不足"),
    REPEAT_ERROR(500501, "该商品每人限购一件"),
    REQUEST_ILLEGAL(500502, "请求非法，请重新尝试"),
    ERROR_CAPTCHA(500503, "验证码错误，请重新输入"),
    ACCESS_LIMIT_REACHED(500504, "请求过于频繁，请稍后再试"),
    // 订单模块 5003xx
    ORDER_NOT_EXIST(500300, "订单信息不存在");


    private final Integer code;
    private final String message;


    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

    RespBeanEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
}
